<template>
  <div class="not-bind">
    <el-dialog :visible.sync="dialogVisible" width="530px" :close-on-click-modal="false" :close-on-press-escape	='false'
               title="邮箱绑定提醒" center>
      <div class="content">
        <p>您需要先绑定自己的常用邮箱到我们的平台，才可以使用邮件模块功能哦！</p>
        <p>点击下方的按钮即可立即去绑定。</p>
      </div>
      <div slot="footer" class="dialog-footer" align="center">
        <el-button @click="dialogVisible = false" size="mini">取 消</el-button>
        <el-button type="primary" size="mini" @click="submit">去绑定</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
    export default {
        name: "DialogNotBind",
        data() {
            return {
                dialogVisible: false,
            }
        },
        mounted() {
            this.bus.$on('showNotBind', () => {
                this.dialogVisible = true
            })
        },
        methods: {
            submit() {
                this.$store.commit('SET_CURRENTSETFRAG', 'eight')
                this.$router.push('/mail/administration');
            }
        },
        beforeDestroy() {
            this.bus.$off('showNotBind')
        }
    }
</script>

<style scoped lang="scss">
  .not-bind {
    .content {
      margin: 30px 10px 30px 10px;

      p {
        line-height: 30px;
        font-size: 14px;
      }
    }
  }
</style>
